﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ExcellentCRM.DataService.Models
{
    /// <summary>
    /// 企业客户表
    /// </summary>
    public class EnterpriseClient : BaseModel
    {
        [Required(AllowEmptyStrings = false)]
        [StringLength(30)]
        public string EnterpriseName { get; set; }

        public long? CourseId { get; set; }

        /// <summary>
        /// 培训顾问Id
        /// </summary>
        public long ConsultantId { get; set; }

        [DataType(DataType.Date)]
        public DateTime DateOfExecuted { get; set; }

        public int Days { get; set; }

        [StringLength(30)]
        public string TeacherName { get; set; }

        /// <summary>
        /// 合同金额
        /// </summary>
        public float ContractPrice { get; set; }

        /// <summary>
        /// 课酬
        /// </summary>
        public float ClassReward { get; set; }

        /// <summary>
        /// 交通差旅
        /// </summary>
        public float TrafficExpenditures { get; set; }

        /// <summary>
        /// 讲义
        /// </summary>
        [StringLength(100)]
        public string Lecture { get; set; }

        /// <summary>
        /// 礼品
        /// </summary>
        [StringLength(100)]
        public string Present { get; set; }

        /// <summary>
        /// 利润
        /// </summary>
        public float Profit { get; set; }

        [ForeignKey("CourseId")]
        public Course Course { get; set; }

        [ForeignKey("ConsultantId")]
        public Staff Consultant { get; set; }

        public virtual IList<StuClient> StuClients { get; set; }
    }
}